package org.example.multiThreading.communication;

public class SubMoney implements Runnable{
    BandCard card;
    public SubMoney(BandCard bandCard) {
        card=bandCard;
    }
    @Override
    public void run() {
        //取10次
        for(int i=0;i<10;i++) {
            try {
                card.take(200);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
